package com.jyh.demo.homework;

import java.util.Scanner;

public class Test2 {
    public static void main(String[] args) {
        System.out.println("请输入QQ号：");
        String qqNum = new Scanner(System.in).next();

        System.out.println("这个QQ号是否正确：");
        if (qqNum.matches("[1-9][0-9]{4,11}+")){
            System.out.println(true);
        }
        else {
            System.out.println(false);
        }
    }
}
